package com.quanyan.ic.common.http.exception;

import com.quanyan.ic.common.http.enums.BaseEnum;

public class BizException extends RuntimeException {

    private BaseEnum baseEnum;
    private Object errorData;

    public BizException(RuntimeException e) {
        super(e);
    }

    public BizException(BaseEnum baseEnum, Object errorData) {
        this.baseEnum = baseEnum;
        this.errorData = errorData;
    }

    public BizException(BaseEnum baseEnum) {
        super(baseEnum.getLabel());
        this.baseEnum = baseEnum;
    }

    public BizException(String errMsg) {
        super(errMsg);
    }

    public BaseEnum getBaseEnum() {
        return baseEnum;
    }

    public void setBaseEnum(BaseEnum baseEnum) {
        this.baseEnum = baseEnum;
    }

    public Object getErrorData() {
        return errorData;
    }

    public void setErrorData(Object errorData) {
        this.errorData = errorData;
    }
}
